const path = require('path');

var myPath = path.resolve('path1','path2','path3');  //此方法在实际开发中用来找文件

console.log(myPath);

var obj = path.parse(myPath); //查看一个完整路径所包含的成员
console.log(obj);